package com.learning.neo4j.baseapi.spring;

import com.learning.neo4j.baseapi.Person;
import org.springframework.data.neo4j.repository.Neo4jRepository;

/**
 * ClassName: MovieRespon
 * Description:
 * Date: 2019/3/28 17:57 【需求编号】
 *
 * @author Sam Sho
 * @version V1.0.0
 */
public interface PersonRepository extends Neo4jRepository<Person, Long> {

    /**
     * 根据名称获取用户信息
     * <p>
     * 自动拦截生成：
     * match (tom {name:"Tom Hanks"}) return tom
     * <p>
     * 详见：https://docs.spring.io/spring-data/neo4j/docs/5.1.5.RELEASE/reference/html/#_query_methods
     * <p>
     * Is   findByNameIs(String name)   n.name = name
     *
     * @param name
     * @return
     */
    Person findByNameIs(String name);

}
